package com.feather.common.web;

import com.feather.common.util.Callback;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

public interface JedisPoolInfo {
	static final JedisPoolInfo[]	CURRENT	= new JedisPoolInfo[] { new JedisPoolInfo() {
												@Override
												public boolean isDummy() {
													return true;
												}

												@Override
												public boolean isEnabled() {
													return false;
												}

												@Override
												public Jedis getJedis() {
													return null;
												}

												@Override
												public JedisPool getPool() {
													return null;
												}

												@Override
												@SuppressWarnings("rawtypes")
												public Object getObject(String key, Callback callback) throws Exception {
													return null;
												}

												@Override
												public void delKeys(String keys) {

												}
											} };

	boolean isDummy();

	boolean isEnabled();

	Jedis getJedis();

	JedisPool getPool();

	@SuppressWarnings("rawtypes")
	Object getObject(String key, Callback callback) throws Exception;

	void delKeys(String keys);
}
